function deleteArticle(id) {
    layer.confirm('确定删除此文章？', {
        btn: ['确定','取消'] //按钮
    }, function(){
        $.ajax({
            type: "DELETE",
            contentType: "application/json;charset=UTF-8",
            url: "/article/delete",
            dataType:"json",
            data: JSON.stringify({id:id}),
            success: function (result) {
                if (result.code == 200) {
                    layer.msg(result.msg, {icon: 1});
                    window.setTimeout(function () {
                        window.location.href="/route/index"
                    },1000)
                } else {
                    layer.msg(result.msg, {icon: 2})
                }
            },
            error: function (e) {
                layer.error(JSON.stringify(e))
            }
        });
    }, function(){

    });
}